package com.xbongbong.admin.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.pro.enums.businessrule.enums.RuleVersionEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 规则镜像
 * @author xingxing.xiao
 * @date 2020/06/11 16:28
 */
@Getter
@Setter
@ToString
public class MirrorBusinessRuleInfoEntity implements Serializable {
    private static final long serialVersionUID = 165824805432034563L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 当前表单saasMark
     * @see com.xbongbong.pro.enums.SaasMarkEnum
     */
    private Integer saasMark;
    /**
     * 当前表单业务类型
     */
    private Integer businessType;

    /**
     * 镜像id
     */
    private Long mirrorId;
    /**
     * 镜像应用id
     */
    private Long mirrorAppId;
    /**
     * 镜像菜单id
     */
    private Long mirrorMenuId;
    /**
     * 镜像表单id
     */
    private Long mirrorFormId;
    /**
     * 来源应用id
     */
    private Long sourceAppId;
    /**
     * 来源菜单id
     */
    private Long sourceMenuId;
    /**
     * 来源表单id
     */
    private Long sourceFormId;
    /**
     * 来源表单业务规则id
     */
    private Long sourceBusinessRuleId;

    /**
     * 数据生效时业务规则名称
     */
    private String activeName;

    /**
     * 数据生效时规则类型 1表示简易模式，2表示高级模式
     *
     */
    private Integer activeType;

    /**
     * 数据生效时目标表单saas标识
     */
    private Integer activeSaasMark;

    /**
     * 生效时目标表单业务类型
     */
    private Integer activeBusinessType;

    /**
     * 生效时目标表单表单id
     */
    private Long activeFormId;
    /**
     * 生效时目标表单菜单id
     */
    private Long activeMenuId;
    /**
     * 生效时目标表单应用id
     */
    private Long activeAppId;

    /**
     * 数据生效时操作方式
     * @see RuleVersionEnum
     */
    private Integer activeOperationType;
    /**
     * 数据生效时 前置过滤条件
     */
    private String activePreConditions;
    /**
     * 数据生效时 过滤条件
     */
    private String activeFilterConditions;

    /**
     * 数据生效时操作
     */
    private String activeOperations;

    /**
     * 数据生效时备注
     */
    private String activeMemo;

    /**
     * 数据生效时是否启用 1： 启用； 否：不启用
     */
    private Integer activeEnable;
    /**
     * 数据失效时业务规则名称
     */
    private String inactiveName;

    /**
     * 数据失效时规则类型 1表示简易模式，2表示高级模式
     *
     */
    private Integer inactiveType;

    /**
     * 数据失效时目标表单saas标识
     */
    private Integer inactiveSaasMark;

    /**
     * 生效时目标表单业务类型
     */
    private Integer inactiveBusinessType;

    /**
     * 生效时目标表单表单id
     */
    private Long inactiveFormId;
    /**
     * 生效时目标表单菜单id
     */
    private Long inactiveMenuId;
    /**
     * 生效时目标表单应用id
     */
    private Long inactiveAppId;

    /**
     * 数据失效时操作方式
     * @see RuleVersionEnum
     */
    private Integer inactiveOperationType;
    /**
     * 数据失效时 前置过滤条件
     */
    private String inactivePreConditions;
    /**
     * 数据失效时 过滤条件
     */
    private String inactiveFilterConditions;

    /**
     * 数据失效时操作
     */
    private String inactiveOperations;

    /**
     * 数据失效时备注
     */
    private String inactiveMemo;

    /**
     * 数据失效时是否启用 1： 启用； 否：不启用
     */
    private Integer inactiveEnable;

    /**
     * 优先级
     */
    private Integer priority;

    /**
     * 创建者userId
     */
    private String creatorId;

    /**
     * 创建时间时间戳
     */
    private Long addTime;

    /**
     * 更新时间时间戳
     */
    private Long updateTime;

    /**
     * 删除标记
     */
    private Integer del;

    public MirrorBusinessRuleInfoEntity() {
        this.del = DelEnum.NORMAL.getDel();
    }

    public MirrorBusinessRuleInfoEntity(Integer saasMark, Integer businessType, Long mirrorId, Long mirrorAppId, Long mirrorMenuId, Long mirrorFormId, Long sourceAppId, Long sourceMenuId, Long sourceFormId, Long sourceBusinessRuleId, String activeName, Integer activeType, Integer activeSaasMark, Integer activeBusinessType, Long activeFormId, Long activeMenuId, Long activeAppId, Integer activeOperationType, String activePreConditions, String activeFilterConditions, String activeOperations, String activeMemo, Integer activeEnable, String inactiveName, Integer inactiveType, Integer inactiveSaasMark, Integer inactiveBusinessType, Long inactiveFormId, Long inactiveMenuId, Long inactiveAppId, Integer inactiveOperationType, String inactivePreConditions, String inactiveFilterConditions, String inactiveOperations, String inactiveMemo, Integer inactiveEnable, Integer priority, String creatorId, Long addTime, Long updateTime, Integer del) {
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.mirrorId = mirrorId;
        this.mirrorAppId = mirrorAppId;
        this.mirrorMenuId = mirrorMenuId;
        this.mirrorFormId = mirrorFormId;
        this.sourceAppId = sourceAppId;
        this.sourceMenuId = sourceMenuId;
        this.sourceFormId = sourceFormId;
        this.sourceBusinessRuleId = sourceBusinessRuleId;
        this.activeName = activeName;
        this.activeType = activeType;
        this.activeSaasMark = activeSaasMark;
        this.activeBusinessType = activeBusinessType;
        this.activeFormId = activeFormId;
        this.activeMenuId = activeMenuId;
        this.activeAppId = activeAppId;
        this.activeOperationType = activeOperationType;
        this.activePreConditions = activePreConditions;
        this.activeFilterConditions = activeFilterConditions;
        this.activeOperations = activeOperations;
        this.activeMemo = activeMemo;
        this.activeEnable = activeEnable;
        this.inactiveName = inactiveName;
        this.inactiveType = inactiveType;
        this.inactiveSaasMark = inactiveSaasMark;
        this.inactiveBusinessType = inactiveBusinessType;
        this.inactiveFormId = inactiveFormId;
        this.inactiveMenuId = inactiveMenuId;
        this.inactiveAppId = inactiveAppId;
        this.inactiveOperationType = inactiveOperationType;
        this.inactivePreConditions = inactivePreConditions;
        this.inactiveFilterConditions = inactiveFilterConditions;
        this.inactiveOperations = inactiveOperations;
        this.inactiveMemo = inactiveMemo;
        this.inactiveEnable = inactiveEnable;
        this.priority = priority;
        this.creatorId = creatorId;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.del = del;
    }

}
